﻿using System;
using System.ComponentModel;
using PetaPoco;
using PmSoft;
using PmSoft.Caching;

namespace Modules.BankSpecialAccount.Entitys
{
    /// <summary>
    /// 专户累计进账、线上和线下代发金额统计每月统计
    ///</summary>
    [TableName("project_special_account_statistic_month")]
    [Description("工资专户累计进账,代发金额月统计")]
    [PrimaryKey("Id", AutoIncrement = true)]
    [CacheSetting(true,PropertyNamesOfArea = "BankAccount")]
    [Serializable]
    public class BankSpecialAccountStatisticMonth : IEntity
    {
        /// <summary>
        ///
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 项目id
        ///</summary>
        [Column("project_id")]
        public int? ProjectId { get; set; }

        /// <summary>
        /// 统计月份
        ///</summary>
        [Column("month")]
        public string Month { get; set; }

        /// <summary>
        /// 专户账号
        ///</summary>
        [Column("bank_account")]
        public string BankAccount { get; set; }

        /// <summary>
        /// 进账总金额（初始值）
        ///</summary>
        [Column("income_amount_start")]
        public decimal? IncomeAmountStart { get; set; }

        /// <summary>
        /// 线上代发金额（初始值）
        ///</summary>
        [Column("online_payment_amount_start")]
        public decimal? OnlinePaymentAmountStart { get; set; }

        /// <summary>
        /// 线下代发金额（初始值）
        ///</summary>
        [Column("offline_payment_amount_start")]
        public decimal? OfflinePaymentAmountStart { get; set; }

        /// <summary>
        /// 余额（初始值）
        ///</summary>
        [Column("balance_start")]
        public decimal? BalanceStart { get; set; }

        /// <summary>
        /// 进账总金额（最终值）
        ///</summary>
        [Column("income_amount_end")]
        public decimal? IncomeAmountEnd { get; set; }

        /// <summary>
        /// 线上代发金额（最终值）
        ///</summary>
        [Column("online_payment_amount_end")]
        public decimal? OnlinePaymentAmountEnd { get; set; }

        /// <summary>
        /// 线下代发金额（最终值）
        ///</summary>
        [Column("offline_payment_amount_end")]
        public decimal? OfflinePaymentAmountEnd { get; set; }

        /// <summary>
        /// 余额（最终值）
        ///</summary>
        [Column("balance_end")]
        public decimal? BalanceEnd { get; set; }

        /// <summary>
        /// 更新时间
        ///</summary>
        [Column("update_time")]
        public DateTime? UpdateTime { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return Id; } }

        #endregion IEntity 成员
    }
}